package com.flyxteam.learner.springboot;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

// ## 打包为war时，需要的servlet初始化类
public class ServletInitializer extends SpringBootServletInitializer {

    // ## 指定配置类，与SpringBoot独立启动时main()里相同
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(ApplicationConfig.class);
    }

}
